package com.bdqn.petmalldemo.common;

import lombok.Getter;

/**
 *响应状态的结果枚举
 */
@Getter
public enum ResultCodeEnum {
    SUCCESS(200,"成功"),
    FAILED(50001,"未知错误"),
    USERNAME_NULL(50002,"用户名不能为空"),
    EMAIL_NULL(50003,"邮箱不能为空"),
    PHONE_NULL(50004,"手机号不能为空"),
    PASSWORD_NULL(50005,"密码不能为空"),
    USERNAME_IS_EXIST(50006,"用户名已存在"),
    EMAIL_IS_EXIST(50006,"邮箱已存在"),
    PHONE_IS_EXIST(50006,"手机号已存在"),
    USERNAME_OR_PASSWORD_ERROR(50007,"用户名或密码错误"),
    USER_DIEABLED(50008,"用户被禁用"),
    ROLE_NULL(50009,"用户角色不能为空"),
    TOKEN_INVALID(419,"当前Token失效"),
    USER_NOT_LOGIN(50010,"用户未登录"),
    QUESTION_NULL(50011,"安全问题不能为空"),
    ANSWER_NULL(50012,"安全问题答案不能为空"),
    QUESTION_ANSWER_ERROR(50013,"安全问题答案不正确"),
    USER_NOT_EXIST(50014,"该用户不存在"),
    SHIPPING_NULL(50015,"该用户收货地址为空"),
    SHIPPING_MORE_THAN_THE_SPECIFIED_AMOUNT(50016,"该用户收货地址数量大于规定数量"),
    TOKEN_NULL(50017,"token不能为空"),
    DATA_NULL(50018,"数据为空"),
    ID_NULL(50019,"Id不能为空"),
    STATUS_NULL(50020,"状态不能为空"),
    CATEGORY_NAME_NULL(50021,"商品分类名称不能为空"),
    CATEGORY_PARENT_ID_NULL(50022,"商品分类父类Id不能为空"),
    CATEGORY_ORDER_NO_NULL(50023,"商品分类排列序号不能为空"),
    CATEGORY_ORDER_NO_IS_EXIST(50024,"当前商品分类排列序号已存在"),
    OBJECT_NULL(50025,"修改对象不能为空"),
    PAGE_NULL(50026,"分页参数不能为空"),
    ARGS_NULL(50027,"参数不能为空"),
    OLD_PASSWORD_ERROR(50028,"原密码错误"),
    NEW_PASSWORD_NOT_EQUALS(50029,"新密码不匹配"),
    NEW_PASSWORD_EQUALS_OLD_PASSWORD(50030,"新密码与旧密码不能一致"),
    FILE_TYPE_NULL(50031,"文件类型不能为空"),
    ALREADY_FAVORITED(50032,"当前商品被该用户所收藏"),
    PRODUCT_NULL(50033,"该商品为空"),
    PROHIBIT_COLLECTION_OF_OWN_GOODS(50034,"卖家禁止收藏自己的商品"),
    ADDRESS_NULL(50035,"收货地址不能为空"),
    PURCHASE_QUANTITY_IS_GREATER_THAN_INVENTORY_QUANTITY(50036,"购买数量不能大于库存数量"),
    ORDER_STATUS_ERROR(50037,"当前订单状态不能执行取消操作"),
    PREPAYMENT_FAILED(50038,"预支付失败"),
    ORDER_STATUS_EXCEPTION(50039,"订单状态异常"),
    DEFAULT_SHIPPING_NOT_ALLOWED_TO_BE_DELETED(50040,"默认地址不允许被删除"),
    ;
    private Integer code;
    private  String msg;

    ResultCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }
}
